package com.jt.www.domain.dto;

import com.jt.www.domain.enums.wxb.MarketModelEnum;
import com.jt.www.domain.enums.wxb.PromotionStatusEnum;
import com.jt.www.domain.vo.RegisterCustomerVo;
import com.jt.www.util.DateUtils;
import io.swagger.annotations.ApiModelProperty;

/**
 * 推广关系
 * Created by shaoyn on 2020/07/15.
 */
public class RegisterCustomerDTO {

    @ApiModelProperty(value = "推广人账号")
    private String managerAccount;

    @ApiModelProperty(value = "推广人名称")
    private String managerName;

    @ApiModelProperty(value = "推广人所在分支机构名称")
    private String branchName;

    @ApiModelProperty(value = "推广码注册用户账号")
    private String customerAccount;

    @ApiModelProperty(value = "推广码注册用户名称")
    private String customerName;

    @ApiModelProperty(value = "推广关系状态 1-正常，2-解除")
    private String promotionStatus;

    @ApiModelProperty(value = "渠道名称")
    private String channelName;

    @ApiModelProperty(value = "增员渠道名称")
    private String addChannelName;

    @ApiModelProperty(value = "营销模式 1-内部人员推广，2-非教育专属营销员，3-教育专属营销员")
    private String marketModel;

    @ApiModelProperty(value = "开始时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;

    @ApiModelProperty(value = "创建时间")
    private String creationTime;

    public RegisterCustomerDTO(RegisterCustomerVo registerCustomerVo) {
        this.managerAccount = registerCustomerVo.getManagerAccount();
        this.managerName = registerCustomerVo.getManagerName();
        this.branchName = registerCustomerVo.getBranchName();
        this.customerAccount = registerCustomerVo.getCustomerAccount();
        this.customerName = registerCustomerVo.getCustomerName();
        this.promotionStatus = PromotionStatusEnum.getDestByStatus(registerCustomerVo.getPromotionStatus());
        this.channelName = registerCustomerVo.getChannelName();
        this.addChannelName = registerCustomerVo.getAddChannelName();
        this.marketModel = MarketModelEnum.getDescByModel(registerCustomerVo.getMarketModel());
        if (null != registerCustomerVo.getCreationTime()) {
            this.creationTime = DateUtils.converDate(registerCustomerVo.getCreationTime());
        }
        if (null != registerCustomerVo.getStartTime()) {
            this.startTime = DateUtils.converDate(registerCustomerVo.getStartTime());
        }
        if (null != registerCustomerVo.getEndTime()) {
            this.endTime = DateUtils.converDate(registerCustomerVo.getEndTime());
        }
    }


    public String getManagerAccount() {
        return managerAccount;
    }

    public void setManagerAccount(String managerAccount) {
        this.managerAccount = managerAccount;
    }

    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public String getBranchName() {
        return branchName;
    }

    public void setBranchName(String branchName) {
        this.branchName = branchName;
    }

    public String getCustomerAccount() {
        return customerAccount;
    }

    public void setCustomerAccount(String customerAccount) {
        this.customerAccount = customerAccount;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getPromotionStatus() {
        return promotionStatus;
    }

    public void setPromotionStatus(String promotionStatus) {
        this.promotionStatus = promotionStatus;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getAddChannelName() {
        return addChannelName;
    }

    public void setAddChannelName(String addChannelName) {
        this.addChannelName = addChannelName;
    }

    public String getMarketModel() {
        return marketModel;
    }

    public void setMarketModel(String marketModel) {
        this.marketModel = marketModel;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(String creationTime) {
        this.creationTime = creationTime;
    }
}
